import request from '@/utils/request';

/**
 * 校园基础数据
 * @param query
 * @returns {*}
 */

export const baseInfo = (query?: any): any => {
  return request({
    url: '/school-screen/base-info',
    method: 'get',
    params: query
  });
};

/**
 * 学生住宿统计
 * @param query
 * @returns {*}
 */

export const accommodationStat = (query?: any): any => {
  return request({
    url: '/school-screen/accommodation-stat',
    method: 'get',
    params: query
  });
};
/**
 * 学生考勤当天打卡统计
 * @param query
 * @returns {*}
 */

export const studentDayStat = (query?: any): any => {
  return request({
    url: '/school-screen/student-attendance/day-stat',
    method: 'get',
    params: query
  });
};
/**
 * 班级考勤当天打卡统计
 * @param query
 * @returns {*}
 */

export const classDayStat = (query?: any): any => {
  return request({
    url: '/school-screen/class-attendance/day-stat',
    method: 'get',
    params: query
  });
};

/**
 * 近七日就寝情况(晚上入寝情况)
 * @param query
 * @returns {*}
 */

export const shitInoutStat = (query?: any): any => {
  return request({
    url: '/dormitoryScreen/shit-inout-stat',
    method: 'get',
    params: query
  });
};
/**
 * 人数统计(按当前时间所在班次)
 * @param query
 * @returns {*}
 */

export const shifPeopleStat = (query?: any): any => {
  return request({
    url: '/dormitoryScreen/shif-people-stat',
    method: 'get',
    params: query
  });
};
/**
 * 人住宿人员信息(按当前时间所在班次)
 * @param query
 * @returns {*}
 */

export const shifMember = (query?: any): any => {
  return request({
    url: '/dormitoryScreen/shif-member',
    method: 'get',
    params: query
  });
};
/**
 * 人数统计(实时)
 * @param query
 * @returns {*}
 */

export const peopleStat = (query?: any): any => {
  return request({
    url: '/dormitoryScreen/people-stat',
    method: 'get',
    params: query
  });
};
/**
 * 宿舍请假列表
 * @param query
 * @returns {*}
 */

export const listStudentLeave = (query?: any): any => {
  return request({
    url: '/dormitoryScreen/listStudentLeave',
    method: 'get',
    params: query
  });
};
/**
 * 宿舍管理员列表
 * @param query
 * @returns {*}
 */

export const listDormitoryManager = (query?: any): any => {
  return request({
    url: '/dormitoryScreen/listDormitoryManager',
    method: 'get',
    params: query
  });
};
/**
 * 今日进出实时统计(暂时不做)
 * @param query
 * @returns {*}
 */

export const currentInoutStat = (query?: any): any => {
  return request({
    url: '/dormitoryScreen/current-inout-stat',
    method: 'get',
    params: query
  });
};
/**
 * 楼栋人数统计
 * @param query
 * @returns {*}
 */

export const buildingPeopleStat = (query?: any): any => {
  return request({
    url: '/dormitoryScreen/building-people-stat',
    method: 'get',
    params: query
  });
};
/**
 * 楼栋人数统计
 * @param query
 * @returns {*}
 */

export const deviceClockingRecordList = (query?: any): any => {
  return request({
    url: '/device/deviceClockingRecord/list',
    method: 'get',
    params: query
  });
};
/**
 * 宿舍树形
 * @param query
 * @returns {*}
 */

export const getBuildingTreeList = (query?: any): any => {
  return request({
    url: '/dormitory/buildingTree/list',
    method: 'get',
    params: query
  });
};
/**
 * 出入记录
 * @param query
 * @returns {*}
 */

export const accessRecordList = (query?: any): any => {
  return request({
    url: '/dormitory/accessRecord/list',
    method: 'get',
    params: query
  });
};
/**
 * 外来人员
 * @param query
 * @returns {*}
 */

export const outsiderList = (query?: any): any => {
  return request({
    url: '/dormitory/attendanceOutsider/list',
    method: 'get',
    params: query
  });
};

/**
 * 宿舍告警列表
 * @param query
 * @returns {*}
 */

export const attendanceAlarmList = (query?: any): any => {
  return request({
    url: '/dormitory/attendanceAlarm/list',
    method: 'get',
    params: query
  });
};
/**
 * 获取设备列表（视频流）
 * @param query
 * @returns {*}
 */

export const deviceInfoList = (query?: any): any => {
  return request({
    url: '/device/deviceInfo/list',
    method: 'get',
    params: query
  });
};
